# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kde-inotify-survey
pkgver=24.08.2
pkgrel=0
pkgdesc="Tooling for monitoring inotify limits and informing the user when they have been or about to be reached"
url="https://invent.kde.org/system/kde-inotify-survey"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="BSD-3-Clause AND (GPL-2.0-only OR GPL-3.0-only)"
# zstd is purely used to unpack the source archive
makedepends="
	extra-cmake-modules
	kauth-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kio-dev
	knotifications-dev
	polkit-qt-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
_repo_url="https://invent.kde.org/system/kde-inotify-survey.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kde-inotify-survey-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9635bf882165ef5c10899bff08721fc57ccb2538383331e2f6a555b64ba99537a7fa18763fdbf897f4836087580b8b62b14adeccd292460327dc854788ac898d  kde-inotify-survey-24.08.2.tar.xz
"
